using System;
using System.Collections.Generic;

namespace Entities
{
    public class EPole : EBase
    {
        #region - Properties -

        public EPolygon Map {get; set;}
        public EPolygon Section {get; set;}
        public List<ELookUp> Phases {get; set;}
        public List<ELookUp> Tops{get;set;}
        public List<ELookUp> Notes{ get; set; }
        public List<EImage> Images { get; set; }
        public ELookUp Specie {get;set;}
        public ELookUp Class{get;set;}
        public ELookUp Length{get;set;}
        public ELookUp Treatment { get; set; }
        public ELookUp InspectionType { get; set; }
        public ELookUp ResultType { get; set; }
        public ETransformerLookUp Kv { get; set; }
        public ETransformerLookUp ConductorType { get; set; }
        public ETransformerLookUp ACSR { get; set; }
        public DateTime LVisit { get; set; }
        public double Latitude {get;set;}
        public double Longitude { get; set; }
        public string InspBy { get; set; }
        public string Number { get; set; }
        public string Circuit { get; set; }
        public DateTime AcquisitionDate { get; set; }
        public int Year { get; set; }
        public bool isElectrical { get; set; }
        public string Comments {get;set; }
        public int GuardsQuantity { get; set; }
        public bool PoleTag { get; set; }
        public bool GroundWireRepair { get; set; }
        public bool Billable { get; set; }

        public bool ValidPosition
        {
            get
            {
                return !((Latitude.Equals(0) || Latitude.Equals(double.MinValue)) &&
                         (Longitude.Equals(0) || Longitude.Equals(double.MinValue)));
            }
        }

        #endregion

        #region - Constructor -

        public EPole()
        {
            Latitude = 0;
            Longitude = 0;
            InspBy = string.Empty;
            Number = string.Empty;
            Year = Int32.MinValue;
            isElectrical = false;
            Billable = false;
            LVisit = DateTime.MinValue;
            Circuit = string.Empty;
        }

        #endregion
    }
}